<?php
	//tova e komentar, praven specialno v branch
	$a = array();
	$n = 5;
	for ($i=1; $i<$n; $i++) 
		$a[$i] = array();
	
	$row = $n-1;
	$col = 0;
	$c = 1;
	
	for (;$row>=0; $row--) {
		$row2 = $row;
		$col = 0;
		
		while ($row2 < $n && $col < $n ) {
			$a[$row2][$col] = $c;
			$row2++;
			$col++;
			$c++;
		}
	}
	
	for ($col=1;$col<$n;$col++) {
		$col2 = $col;
		$row = 0;
		while ($row < $n && $col2 < $n ) {
			$a[$row][$col2] = $c;
			$row++;
			$col2++;
			$c++;
		}
	}
	
	
		
?>

